package com.example.ccod.nacos.gateway.client;

import com.ccod.nacos.goods.facade.GoodsDto;
import com.ccod.nacos.goods.model.GoodsFacade;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: ccod
 * @data: 2020/12/27 13:36
 **/
@Service
public class GoodsFacadeClientImpl implements GoodsFacadeClient {

    @DubboReference
    private GoodsFacade goodsFacade;

    @Override
    public boolean addGoods(GoodsDto dto) {
        System.out.println("新增商品服务执行了");
        return goodsFacade.addGoods(dto);
    }

    @Override
    public List<GoodsDto> searchGoods() {
        System.out.println("搜索所有商品服务执行了");
        return goodsFacade.searchGoods();
    }


}
